using System;
using System.Reflection;

namespace Mbs.ComponentModel.Container.Injection
{
    public class MethodInspect : MethodBaseInspect<MethodInfo>
    {
        private const BindingFlags Flags = BindingFlags.Instance | BindingFlags.Public;
        private static readonly Type VoidType = typeof(void);

        protected override MethodInfo[] GetMethods(System.Type type)
        {
            return type.GetMethods(Flags);
        }

        protected override bool MethodFilter(MethodInfo method)
        {
            return method.ReturnType == MethodInspect.VoidType;
        }
    }
}
